package com.shop.user.service.role.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shop.user.dao.SysRoleMapper;
import com.shop.user.service.role.IRoleService;
import com.shop.user.vo.role.RolePageReqVo;
import com.shop.user.vo.role.RolePageResVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RoleServiceImpl implements IRoleService {
    @Autowired
    private SysRoleMapper sysRoleMapper;

    /**
     * 查询角色列表
     * @param reqVo
     * @return
     */
    public Page<RolePageResVo> findPage(RolePageReqVo reqVo)
    {
        IPage<?> pageReq = Page.of(reqVo.getPageNum(),reqVo.getPageSize());
        return sysRoleMapper.findPage(pageReq,reqVo);
    }
}
